extension $String on String {
  static int getLength(String? string) {
    if (string == null) {
      return 0;
    }
    return string.length;
  }

  static String? getValue(String string,
      {int minLength = 1, String? defaultValue}) {
    if (string != null && string.length >= minLength) {
      return string;
    }
    return defaultValue;
  }
}
